package com.ml.mall.bean.req.coupon;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 *   @description    :description 
 *   @author         :zxm
 *   @date           :2021/5/21
 *   @version        :1.0
**/
@ApiModel(value = "优惠券新增model")
@Data
public class CouponNewDto {
    /**
     * 1：全部；2：免邮；3:卖家 4：商品 ；
     */
    @ApiModelProperty(value = "优惠券类型")
    private Integer couponType;

    @ApiModelProperty(value = "优惠券金额")
    private BigDecimal couponMoney;

    @ApiModelProperty(value = "优惠券数量")
    private Integer amount;

    @ApiModelProperty(value = "优惠券最低限制")
    private BigDecimal lowLimitMoney;

    @ApiModelProperty(value = "优惠券最高限制")
    private BigDecimal topLimitMoney;

    @ApiModelProperty(value = "同一公司能使用的次数")
    private Integer usageLimitNum;

    @ApiModelProperty(value = "优惠券开始时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date timeBegin;

    @ApiModelProperty(value = "优惠券结束时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date timeEnd;

    @ApiModelProperty(value = "优惠券优惠描述")
    private String description;

    /**
     * 是否互斥：0是；1否；多个优惠券相加；只要是结果大于等于1不能同时使用；
     */
    @ApiModelProperty(value = "是否多个优惠券相加使用 0是；1否")
    private Integer mutualType;


    @ApiModelProperty(value = "0:固定值 1：百分比")
    private Integer couponClass;

    @ApiModelProperty(value = "费率")
    private BigDecimal couponRate;

    @ApiModelProperty(value = "优惠券名称")
    private String couponName;

    @ApiModelProperty(value = "承担者：0：系统承担；1：商家承担")
    private Integer bearer;

    @ApiModelProperty(value = "优惠券关联对象")
    private CouponRelationDto couponRelationDto;
}
